package data;

import org.sql2o.Sql2o;

public class Connection {
	public Sql2o open(){
		ConnectionInfo info = new ConnectionInfo("database.properties");
		try {
			Class.forName(info.getDatabaseDriver()).newInstance();
		} catch (InstantiationException | IllegalAccessException
				| ClassNotFoundException e) {
			e.printStackTrace();
		}
		return new Sql2o(info.getUrl(), info.getUsername(), info.getPassword());
	}
	
}